<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateStoreCouponProductTable extends Migration
{
    /**
     * Run the migrations.
     *优惠卷模板关联列表
     * @return void
     */
    public function up()
    {
        Schema::create('store_coupon_product', function (Blueprint $table) {
            $table->id()->comment('优惠卷模板关联列表');
            $table->integer('coupon_id')->index()->comment('优惠卷模板id');
            $table->integer('product_id')->index()->comment('商品id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('store_coupon_product');
    }
}
